package com.example.flightsearch.data

import kotlinx.coroutines.flow.Flow
import javax.inject.Inject

class OfflineAirportRepository @Inject constructor(private val airportDao: AirportDao) : AirportRepository {
    override fun getAirportByCodeOrName(name: String): Flow<List<Airport>> = airportDao.getAirportByCodeOrName("%$name%")
    override fun getAirportByCode(code: String): Flow<Airport> = airportDao.getAirportByCode(code)
    override fun getAirportByNotCode(code: String): Flow<List<Airport>> = airportDao.getAirportByNotCode(code)
}